package com.zhn.evsi.controller.Evsi;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhn.evsi.common.Result;
import com.zhn.evsi.domain.entity.evsi.EvsiInvtypes;
import com.zhn.evsi.service.IEvsiInvtypesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "物品信息")
@RestController
@RequestMapping("evsi/invtypes")
public class EvsiInvtypesController {

    @Autowired
    private IEvsiInvtypesService invtypesService;

    @ApiOperation("分页查询物品信息")
    @GetMapping("/page")
    public Result invtypesIPage(@RequestParam Integer pageNum,
                                @RequestParam Integer pageSize) {
        IPage<EvsiInvtypes> page = invtypesService.page(new Page<>(pageNum, pageSize));
        return Result.success(page);
    }
}
